require "Common/define"
require "Logic/Config"
require "Common/functions"
---@class BtnChapter
BtnChapter = {}
HelperFunc.SetUIEnv(BtnChapter)
local this = BtnChapter;

function BtnChapter.Init()
    local name, package = getUIName(PanelNames.BtnChapter);
    panelMgr:ShowUI(name, package, this.onCreate, Config.useLocalUI);
end

function BtnChapter.onCreate(obj)
    --obj:SetActive(false);
end
---@param obj FairyGUI.GComponent
function BtnChapter.initData(obj, data, is, fightType, notState, notShowBan, ismy, hothero, iswish, formation_type)
    this.title = obj:GetChild("title")
    this.level = obj:GetChild("level")
    this.lock = obj:GetController("lock")
    this.title = data.f_Id
    this.lock.selectedIndex = 0
end

return BtnChapter;